import { useDigitalTwinStore } from '@/stores/digitalTwin'
const digitalTwinStore = useDigitalTwinStore()

export const initLake = async () => {
  await fdapi.camera.set(525323.14875, 3435349.377813, 273227.06, -85.987404, -95.227394, 2)
  await fdapi.weather.setDarkMode(true)
  await fdapi.infoTree.hide(digitalTwinStore.infoTreeObj['苏州地形影像_Water'])

  const decal = {
    id: 'lake',
    groupId: '',
    userData: '',
    texturePath: 'D:/Freedo/Library/孪创城市/规划/世界湖区.png',
    order: 1,
    decalBlendMode: 0,
    location: [524000, 3462000, 127],
    rotation: [-90, 0, 0],
    scale: [270000, 270000, 270000]
  }
  await fdapi.decal.add(decal)
}
export const exitLake = async () => {
  await fdapi.weather.setDarkMode(false)
  await fdapi.infoTree.show(digitalTwinStore.infoTreeObj['苏州地形影像_Water'])
  await fdapi.decal.delete('lake')
}
